Repository navigation
Make iOS keyboard observation and actions explicit - #4681
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
At 20c1d99 the code looks sound, but I can't call it ready: the new iPad paths and the daemon-routed dismiss refusal have no live run. One check is still queued and the other 16 pass. Nothing in the diff overlaps a non-passing job. The cited evidence covers iPhone 16 / iOS 26.2 runner XCTests and two replays. The new iPad branches have no device run: accessory-only means hidden (RunnerKeyboardStatus.swift:39), the return-key rule on iPad key rows, and the recovery path the help now prescribes in place of the deleted iPad hide-key dismissal (press the Hide Keyboard key by ref). The Not blocking, take or leave: the iOS dismiss mechanism field now has no producer (Swift DataPayload.keyboardDismissMechanism is never assigned, yet the interactor, daemon message branch in keyboard-runtime.ts, session journal enum and both contract fields still carry it), so deleting it end to end would reduce the iOS 'mechanism' result to the hidden no-op acknowledgement; keyboardSpace in RunnerKeyboardStatus.swift:54 adds a second quarter-turn detector where SnapshotGeometrySpace.space already decides the same question for keyboardBandFact, so one shared helper would serve both; and the comments at device-input-state.ts:157 and :42-46 still say iOS refuses 'a keyboard that stays up' after a safe mechanism, when iOS now refuses a visible keyboard before dispatch and Android after its escape keyevents. Behavior on real iPad key planes (split, floating, Stage Manager) rests on the code only. The docs say Limrun iOS sessions route keyboard dismiss and status through this runner build, so the same refusal would apply there. Once the iPad and daemon run is posted, the remaining cleanups are small. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on 20c1d99. The verdict and the full list are in the summary comment.
20c1d99 to
066c183
Compare
|
Verified on iPad A16 / iPadOS 26.2 through the built CLI and daemon at
The released dismiss-mechanism field remains readable for older runners. The rotation path uses the shared coordinate transform. Its detached keyboard snapshot lacks the full-window ancestry that the capture-side detector uses. The Android refusal comments now describe the different dispatch outcomes. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 066c183. The verdict and the full list are in the summary comment.
|
Thanks for the update. At 066c183 the keyboard avoidance is back as the default, and only the daemon one-finger pan crosses the keyboard. The label-only Search case is now documented and tested. Your live device report at 066c183 covers the route. The Coverage check failed, but its log (job) stops about 2.5 minutes into Not blocking, take or leave: (1) The rule that picks the keyboard-inclusive viewport at gesture-runtime.ts#L125 has no daemon test, so setting it to Could the runner's On the open inline threads: the one on lit-panel viewport reads does not apply, because |
This comment has been minimized.
This comment has been minimized.
|
At 9a24f44 the findings from the earlier review (#4681 (comment)) are fixed. Not blocking, and you can take or leave these: the new The Apple smoke job is red because of this change. The renamed wire field matches between the TS sender and the Swift key by inspection, but nothing on a device shows a pan crossing the keyboard at this head. The earlier live report covered the same route with the old field name. There are no conflicts. The open inline threads on #4681 (comment) (unreadable keyboard read fails closed, as documented), #4681 (comment) (return key unavailable with unknown dispatch is intentional and documented), #4681 (comment) (identifier-only status was fixed earlier) and #4681 (comment) (keyboard avoidance is the default, now narrowed further) do not apply at this commit, so you can resolve them. |
This comment has been minimized.
This comment has been minimized.
|
The earlier findings on 9a24f44 are fixed, and I found one remaining defect at fa4f796. All 18 checks pass at fa4f796, including Smoke Tests (macos), which exercises the updated runner-request fixture. The latest delta only touches test fixtures and docs. There are no conflicts. The production keyboard status reader in RunnerKeyboardStatus.swift passes the snapshot viewport, which resolves the app window. The classifier intersects the system keyboard frame with that window and reports hidden when they do not overlap. The placed-iPad fixture in CoordinateSpaceTests.swift has the app window ending at y=889 and the keyboard starting at y=925. That keyboard has 282 points visible on the display and zero inside the app window. With a software keyboard below a placed iPad window, status can report Could the native observation in RunnerTests+Keyboard.swift take the display or panel bounds from the runner's existing geometry authority and pass them to The earlier automated thread on elsewhere-read search roots does not apply and can be resolved, because |
This comment has been minimized.
This comment has been minimized.
|
The earlier findings from fa4f796 are fixed in b804cbf, but the placed-window case still has no test that would catch a regression. All 18 checks pass, and Smoke Tests (ios) exercises the changed keyboardStatus sole-display route live through smoke:form-input. There are no conflicts. Before merge, please add the runner test below. The daemon sends litPanel only for multi-panel (foldable) devices: resolveRunnerRequestLitPanel returns undefined unless the read is multi-panel. So the case the earlier review raised, a software keyboard below a placed iPad window (Windowed Apps or Stage Manager), takes the else branch at RunnerTests+Keyboard.swift:179-181. testKeyboardCommandsUseTheDisplayBelowAPlacedWindow sends litPanel displayId 3, so it only drives the requestLitPanel branch. The classifier tests pass display sizes directly, and the iPhone smoke covers only a full-screen sole display, where window and display coincide. If the else branch went back to the app-window viewport, every test would stay green. The rule the code must satisfy: on every route that reaches keyboardStatus, visibility is measured against the display that hosts the app, never the app window. Please add the same placed-window case without litPanel: probe the app window at 224,207 386x682, seed mainOwned.soleDisplayPortraitSize = 834x1210 (or stub RunnerSoleScreenSize), and assert keyboardStatus is visible with returnKey done and keyboardDismiss refused. Parameterizing the existing test over both branches also works. Not blocking, and fine to take or leave: the lit-panel-else-sole-screen selection at RunnerTests+Keyboard.swift:175 repeats edgeTouchDisplayPortraitSize (RunnerTests+ScreenEdgeGesture.swift:81-86), books the lit-panel window only to read a size that requestLitPanel already carries, and reads orientation from two sources, so one owner such as hostDisplayFrame(app:) used by keyboardStatus and the edge-touch path would remove the duplication. |
|
Addressed the missing single-display placed-window case in
The local affected gate and hosted checks are running. |
This comment has been minimized.
This comment has been minimized.
|
The sole-display placed-window regression you added now covers the earlier finding, and the keyboard geometry code did not change. One docs problem remains at db7acde. The capability note at capabilities.md#L128 says the Apple runner reports unknown when the key's wording names no known action. The runner classifies the accessibility identifier instead (RunnerKeyboardStatus.swift#L45-L53). A key labeled szukaj with identifier Search returns search, as the test at RunnerTests+KeyboardReturnKeyTests.swift:18-29 pins. A reader could expect unknown for a localized Return label and write the wrong status assertion. Please say that the recognized accessibility identifier gives the action, the localized wording gives the label, and the action is unknown only when the runner cannot identify it. The open inline thread on the keyboardStatus read block (discussion) does not apply: it is resolved, and returning nil when the state cannot be measured is the intended contract, so the author can resolve it. All 18 checks pass at db7acde. The new test skips when the host has more than one screen, so please name the CI lane that runs it in the PR body. After the docs fix, this is ready to merge. |
|
Updated the capability note in The PR body now names XCTest Nightly’s iPhone full-suite lane for the single-display regression. The source-derived test selection confirms that lane includes it. I verified that the keyboard-status thread remains resolved. Docs link and prose checks passed, and CI is running on the new head. Review |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift:596 |
🆕 keyboard dismiss never ends editing on tvOS — the Siri Remote Menu press is gone |
1 finding below minor hidden (user_settings.min_severity).
1 new finding away from what changed since db7acde not shown. Comment @apex-sentinel-staging review for a full review.
Reviewed with this repository's own Sentinel configuration (894c80ac681c).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 8ffee4d. The verdict and the full list are in the summary comment.
|
The earlier findings from db7acde (#4681 (comment)) are now fixed in 8ffee4d. This update touches only a docs note and its generator annotation, so it overlaps no device or runner route, and I found no new problems in it. Could resolveGestureRuntimePlan in packages/contracts/src/platform-runtime-operations.ts own the keyboard-inclusive viewport policy for the existing single-pointer plan tier? That would reuse the contact classification there and let the daemon forward the selected mode. The Apple adapter and Swift runner could keep translating that mode into the native clipping choice. The remaining check is a review check, not a test job. There are no conflicts. The design question above is the last thing before the label: either move the policy, or reply with why the current split is smaller. |
|
I’d keep the viewport policy in the daemon binding for this PR. Moving the rule would reuse the pointer classification and remove one argument from the daemon binder. It would also add a viewport option to the shared plan type with one consumer, while the daemon would still project it into the same bound viewport request. Keeping the rule at that binding leaves the shared plan interface smaller. The daemon tests cover one- and two-finger pans, a directional fling, a coordinate swipe, and a Maestro endpoint-hold swipe. Daemon binding · Viewport tests · Review |
|
Thanks, that answers the design question. The viewport exception applies only to timed one-finger pans, while the plan tier also covers flings and endpoint-hold pans, so the tier alone cannot decide clipping. A shared-plan option with one consumer would grow the shared interface for no gain. Keeping the rule at the daemon binding is the smaller design, and the viewport tests cover each gesture kind. With the docs fix at 8ffee4d and no code findings, this is ready for review. |
Summary
Make keyboard commands predictable across iOS and iPadOS apps and languages. 41 files.
keyboard status(get)keyboard enter(return)keyboard dismiss, MaestrohideKeyboardgesture paniPad examples with Polish Search open.
agent-device keyboard status --json→visible: true,returnKey: "search",returnKeyLabel: "szukaj".agent-device keyboard dismiss --json→UNSUPPORTED_OPERATION, reasonkeyboard_dismiss_unavailable,dispatched: "no".agent-device snapshot -i→ Hide Keyboard at@e67in this capture.agent-device press @e67hid the keys.Validation
972b5a5a23tapped adjacent Done. At066c183d88, iPad CLI tests confirmed refusal, explicit dismissal, and drag dismissal. Device evidencefa4f796caa. Both variants passed ondb7acdea4d, along with affected validation and all 18 hosted checks. The single-display test runs in XCTest Nightly’s iPhone full-suite lane.8ffee4df54, the docs-only affected gate and all 18 hosted checks passed. Sentinel approved.